package com.cn.jiyun.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cn.jiyun.entity.pojo.Room;
import com.cn.jiyun.mapper.HotelMapper;

import com.cn.jiyun.service.IHotelService;
import com.cn.jiyun.entity.pojo.Hotel;
import com.cn.jiyun.entity.vo.HotelVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 针对表【-Hotel】的业务操作的Service实现类
 *
 * @author lxy
 * @since 2025-01-17
 */
@Service
public class HotelServiceImpl extends ServiceImpl<HotelMapper, Hotel> implements IHotelService {
  @Autowired
  private  HotelMapper hotelMapper;


    @Override
    public List<Hotel> findAllList(HotelVO hotelVo) {
        List<Hotel> list = hotelMapper.findAllList(hotelVo);
        return list;
    }

    @Override
    public Hotel getHotelId(Integer Id) {
        return hotelMapper.getHotelId(Id);
    }

    @Override
    public List<Room> selectRoom(Room room) {
        List<Room> ListRoom =hotelMapper.selectRoom(room);
        return ListRoom;
    }



    @Override
    public Room getRoomId(Integer roomId) {
        return hotelMapper.selectRoombyId(roomId);
    }

}
